Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace websocket dependency with ws #2589

Merged
merged 2 commits into from
Aug 8, 2022
Merged

Conversation

tomaka
Copy link
Contributor

@tomaka tomaka commented Aug 7, 2022

Fix #2588

The websocket package on NPM is just kind of fucked up, and it is impossible to make it work on both ModuleJS and CommonJS. This PR switches to ws, which works fine.
This was previously not possible because we were using the websocket library in the browser as well. This is no longer the case.

The biggest effort was updating the demo.

Additionally, I've made some tweaks to the tsconfig.json to disable some magic features. I removed them as a first attempt at understanding the issue. They turned out to be unrelated, but they're better left disabled anyway.

Copy link
Contributor

@mergify mergify bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automatically approving tomaka's pull requests. This auto-approval will be removed once more maintainers are active.

@tomaka
Copy link
Contributor Author

tomaka commented Aug 7, 2022

Since this PR makes a small tweak to index-browser.ts, I've tested this change in the browser, and it works.

@github-actions
Copy link
Contributor

github-actions bot commented Aug 7, 2022

twiggy diff report

Difference in .wasm size before and after this pull request.


 Delta Bytes │ Item
─────────────┼──────────────────
          +0 ┊ Σ [0 Total Rows]

@tomaka tomaka added the automerge Automatically merge pull request as soon as possible label Aug 8, 2022
@mergify mergify bot merged commit 7c45f55 into paritytech:main Aug 8, 2022
@tomaka tomaka deleted the fix-2588 branch August 8, 2022 08:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge Automatically merge pull request as soon as possible
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Nodejs issue
1 participant